﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.Core.Content;
using MvcEngine.Core.Website;
using MvcEngine.Mvc.Models.ViewModels;
using System.ComponentModel;
using MvcEngine.Core.Validation;
using System.ComponentModel.DataAnnotations;
using MvcEngine.Core.Account;

namespace MvcEngine.Mvc.Models
{
    public class PageEditViewModel : MvcEngineModel
    {
        public IList<Skin> Skins { get; set; }

        public IList<SkinTemplate> SkinTemplates { get; set; }

        public IList<Permission> Permissions { get; set; }

        public IList<PagePermission> PagePermissions { get; set; }

        public IList<Role> Roles { get; set; }

        public Guid Id { get; set; }

        [MvcEngineDisplayName("PageVisibleLabel")]
        public bool Visible { get; set; }

        [MvcEngineDisplayName("PageVisibleInMenuLabel")]
        public bool VisibleInMenu { get; set; }

        [DropDownList("Skins", "Id", "Name")]
        [MvcEngineDisplayName("SkinsLabel")]
        public Guid? SkinId { get; set; }

        [DropDownList("SkinTemplates", "Id", "Name")]
        [MvcEngineDisplayName("SkinTemplatesLabel")]
        public Guid? SkinTemplateId { get; set; }

        [MvcEngineDisplayName("PageTitleLabel")]
        [RequiredFieldValidator("$PageTitleRequiredValidator")]
        [LengthValidator("$PageTitleLengthValidator", 256)]
        public string Title { get; set; }

        [MvcEngineDisplayName("PageMenuTitleLabel")]
        [LengthValidator("$PageMenuTitleLengthValidator", 256)]
        public string MenuTitle { get; set; }

        [MvcEngineDisplayName("PageHeaderLabel")]
        public string Header { get; set; }

        [MvcEngineDisplayName("PageNameLabel")]
        [RequiredFieldValidator("$PageNameRequiredValidator")]
        [LengthValidator("$PageNameLengthValidator", 256)]
        public string Name { get; set; }

        [MvcEngineDisplayName("PageOrderNumberLabel")]
        public int OrderNumber { get; set; }

        [MvcEngineDisplayName("PageKeywordsLabel")]
        public string Keywords { get; set; }

        [MvcEngineDisplayName("PageDescriptionLabel")]
        public string Description { get; set; }
    }
}
